<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<div class="modal fade" id="myModal" tabindex="-1" role="dialog"
	aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal"
					aria-hidden="true">&times;</button>
				<h4 class="modal-title" id="myModalLabel">添加新商品</h4>
			</div>
			<form action="<%=path%>/rest/goods/addGoods" method="post"
				class="definewidth m20" id="addCustomerForm" name="addCustomerForm" 
				enctype="multipart/form-data">
				<div class="modal-body">

					<table class="table table-bordered table-hover definewidth m10">
						<tr>
							<td width="30%" class="tableleft" style="text-align: right">商品名称：</td>
							<td width="70%"><input class="inputClass" type="text"
								name="gName" id="gName" /> <label class="errorClass"
								id="catNameError"></label></td>
						</tr>
						<tr>
							<td class="tableleft" style="text-align: right">商品图片：</td>
							<td>
							<div ><img title="默认商品图片" src="../../mallstyle/picture/small_201603211102144090.jpg" id="img0" width="100px" height="100px"
												style="margin-left: 10px;margin-bottom: 5px">
										</div>
										<input type="file" name="gPicture2" id="file0" multiple="multiple" value="suan" accept="image/*"/>
							<!--<input class="inputClass" type="text" name="catDetail"
								id="catDetail" /> -->
								<label class="errorClass" id="catDetailError"></label>
								</td>
						</tr>
						<tr>
							<td class="tableleft" style="text-align: right">商品描述：</td>
							<td><input class="inputClass" type="text" name="gDetail"
								id="gDetail" /> <label class="errorClass" id="catDetailError"></label></td>
						</tr>
						<tr>
							<td width="30%" class="tableleft" style="text-align: right">所属一级分类：</td>
							<td width="70%"><select class="inputClass"  onchange="changeType(this);"
								id="cLv">
									<c:forEach items="${parents }" var="parent">
										<option value="${parent.catId }">${parent.catName }</option>
									</c:forEach>
							</select> <label class="errorClass" id="cLvError"></label></td>
						</tr>
						<tr>
							<td width="30%" class="tableleft" style="text-align: right">所属二级分类：</td>
							<!--  AJAX异步请求-->
							<td width="70%"><select class="inputClass" name="catCid"
								id="childList">
							</select> <label class="errorClass" id="cLvError"></label></td>
						</tr>
						<tr>
							<td class="tableleft" style="text-align: right">商品价格（元）：</td>
							<td><input class="inputClass" type="text" name="gPrice"
								id="gPrice" /> <label class="errorClass" id="catDetailError"></label></td>
						</tr>
						<tr>
							<td class="tableleft" style="text-align: right">商品库存量：</td>
							<td><input class="inputClass" type="text" name="gCount"
								id="gCount" /> <label class="errorClass" id="catDetailError"></label></td>
						</tr>
					</table>
				</div>
				<div class="modal-footer">
					<button type="submit" class="btn btn-primary">提交更改</button>
					<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
				</div>
			</form>
		</div>
		<!-- /.modal-content -->
	</div>
	<!-- /.modal -->
</div>